package com.fzg.controller;


import com.fzg.common.enums.ResponseWrapper;
import com.fzg.service.UserGuanzhuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fzg
 * @since 2022-06-22
 */
@RestController
@RequestMapping("/user-guanzhu")
public class UserGuanzhuController {

    @Autowired
    private UserGuanzhuService userGuanzhuService;

    /**
     * 关注
     */
    @GetMapping("/concernUser")
    public ResponseWrapper concernUser(HttpServletRequest request, @RequestParam Integer userAid){
        return userGuanzhuService.concernUser(request,userAid);
    }

    /**
     * 取消关注
     */
    @GetMapping("/cancelConcernUser")
    public ResponseWrapper cancelConcernUser(HttpServletRequest request, @RequestParam Integer userAid){
        return userGuanzhuService.cancelConcernUser(request,userAid);
    }

}
